package com.gae.blore.client.domain;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Inheritance;
import javax.jdo.annotations.InheritanceStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * Domain model for place
 * 
 * @author nss
 * 
 */
@PersistenceCapable
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
abstract public class Place implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6889958765216217787L;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private double lat;

	@Persistent
	private double lng;

	@Persistent
	private String name;

	@Persistent
	private String add;

	@Persistent
	private String land;

	public Place(String name, double lng, double lat, String add, String land) {

		this.name = name;
		this.lng = lng;
		this.lat = lat;
		this.add = add;
		this.land = land;

	}

	public Place() {
		// TODO Auto-generated constructor stub
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public double getLat() {
		return lat;
	}

	public void setLat(double lat) {
		this.lat = lat;
	}

	public double getLng() {
		return lng;
	}

	public void setLng(double lng) {
		this.lng = lng;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAdd() {
		return add;
	}

	public void setAdd(String add) {
		this.add = add;
	}

	public String getLand() {
		return land;
	}

	public void setLand(String land) {
		this.land = land;
	}

	@Override
	public String toString() {
		return "Place [id=" + id + ", lat=" + lat + ", lng=" + lng + ", name="
				+ name + ", address=" + add + "]";
	}

}
